<?php
//引入文件
include_once ("pdo.php");
//实例化
$obj=new Me("root","root");
//接收数据
$arr['user_name']=$_POST['user_name'];
$arr['user_pwd']=$_POST['user_pwd'];
//添加数据
$data=$obj->addOne("user",$arr);
//判断
if($data){
    echo "<script>alert('添加成功');location.href='show.php'</script>";
}else{
    echo "<script>alert('添加失败');location.href='add.php'</script>";
}
